﻿using System.Data.Entity.ModelConfiguration;
using Core.Model;

namespace Infrastructure.Configurations
{
    internal class ProductConfiguration : EntityTypeConfiguration<Product>
    {
        public ProductConfiguration()
        {
            HasKey(p => p.ProductId);
            HasRequired(p => p.Category);
            Property(p => p.Name).HasMaxLength(80);
            Property(p => p.Description).HasMaxLength(255);
        }
    }
}